<%-- 
    Document   : mappa
    Created on : 8-feb-2012, 13.22.56
    Author     : Ale
--%>

<%@page import="java.util.List"%>
<%! 
    List<String> directions;
%>

<%
    String from = (String) request.getAttribute("from");
    String to = (String) request.getAttribute("to");
    directions = (List<String>) request.getAttribute("directions");
    if (directions == null || directions.isEmpty()) {
        utilities.Utilities.errore("indircazioni non specificate", request, response);
    }
%>

<%@page import="utilities.googleMap.Directions"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

<h2>Indicazioni e mappa</h2>
<p>Da <em><%=from%></em> a <em><%=to%></em></p>

<div>
    <img src="<%= directions.remove(0)%>" class="mappa" alt="mappa"/>
    <div class="indicazioni">
        <h3>Indicazioni</h3>
        <ul>
        <% for (String dir: directions){ %>
            <li><%= dir %></li>
        <% } %>
        </ul>
    </div>
</div>
